Integrand size = 21, antiderivative size = 294 \[ \int \frac {\cos ^m(c+d x)}{(a+b \cos (c+d x))^2} \, dx=\frac {b^2 \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2} (-1-m),2,\frac {3}{2},\sin ^2(c+d x),-\frac {b^2 \sin ^2(c+d x)}{a^2-b^2}\right ) \cos ^{1+m}(c+d x) \cos ^2(c+d x)^{\frac {1}{2} (-1-m)} \sin (c+d x)}{\left (a^2-b^2\right )^2 d}+\frac {a^2 \operatorname {AppellF1}\left (\frac {1}{2},\frac {1-m}{2},2,\frac {3}{2},\sin ^2(c+d x),-\frac {b^2 \sin ^2(c+d x)}{a^2-b^2}\right ) \cos ^{-1+m}(c+d x) \cos ^2(c+d x)^{\frac {1-m}{2}} \sin (c+d x)}{\left (a^2-b^2\right )^2 d}-\frac {2 a b \operatorname {AppellF1}\left (\frac {1}{2},-\frac {m}{2},2,\frac {3}{2},\sin ^2(c+d x),-\frac {b^2 \sin ^2(c+d x)}{a^2-b^2}\right ) \cos ^m(c+d x) \cos ^2(c+d x)^{-m/2} \sin (c+d x)}{\left (a^2-b^2\right )^2 d} \]
[Out]
Time = 0.41 (sec) , antiderivative size = 294, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2903, 3268, 440} \[ \int \frac {\cos ^m(c+d x)}{(a+b \cos (c+d x))^2} \, dx=\frac {b^2 \sin (c+d x) \cos ^{m+1}(c+d x) \cos ^2(c+d x)^{\frac {1}{2} (-m-1)} \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2} (-m-1),2,\frac {3}{2},\sin ^2(c+d x),-\frac {b^2 \sin ^2(c+d x)}{a^2-b^2}\right )}{d \left (a^2-b^2\right )^2}+\frac {a^2 \sin (c+d x) \cos ^{m-1}(c+d x) \cos ^2(c+d x)^{\frac {1-m}{2}} \operatorname {AppellF1}\left (\frac {1}{2},\frac {1-m}{2},2,\frac {3}{2},\sin ^2(c+d x),-\frac {b^2 \sin ^2(c+d x)}{a^2-b^2}\right )}{d \left (a^2-b^2\right )^2}-\frac {2 a b \sin (c+d x) \cos ^m(c+d x) \cos ^2(c+d x)^{-m/2} \operatorname {AppellF1}\left (\frac {1}{2},-\frac {m}{2},2,\frac {3}{2},\sin ^2(c+d x),-\frac {b^2 \sin ^2(c+d x)}{a^2-b^2}\right )}{d \left (a^2-b^2\right )^2} \]
[In]
[Out]
Rule 440
Rule 2903
Rule 3268
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {a^2 \cos ^m(c+d x)}{\left (a^2-b^2 \cos ^2(c+d x)\right )^2}-\frac {2 a b \cos ^{1+m}(c+d x)}{\left (a^2-b^2 \cos ^2(c+d x)\right )^2}+\frac {b^2 \cos ^{2+m}(c+d x)}{\left (-a^2+b^2 \cos ^2(c+d x)\right )^2}\right ) \, dx \\ & = a^2 \int \frac {\cos ^m(c+d x)}{\left (a^2-b^2 \cos ^2(c+d x)\right )^2} \, dx-(2 a b) \int \frac {\cos ^{1+m}(c+d x)}{\left (a^2-b^2 \cos ^2(c+d x)\right )^2} \, dx+b^2 \int \frac {\cos ^{2+m}(c+d x)}{\left (-a^2+b^2 \cos ^2(c+d x)\right )^2} \, dx \\ & = \frac {\left (b^2 \cos ^{2 \left (\frac {1}{2}+\frac {m}{2}\right )}(c+d x) \cos ^2(c+d x)^{-\frac {1}{2}-\frac {m}{2}}\right ) \text {Subst}\left (\int \frac {\left (1-x^2\right )^{\frac {1+m}{2}}}{\left (-a^2+b^2-b^2 x^2\right )^2} \, dx,x,\sin (c+d x)\right )}{d}+\frac {\left (a^2 \cos ^{2 \left (-\frac {1}{2}+\frac {m}{2}\right )}(c+d x) \cos ^2(c+d x)^{\frac {1}{2}-\frac {m}{2}}\right ) \text {Subst}\left (\int \frac {\left (1-x^2\right )^{\frac {1}{2} (-1+m)}}{\left (a^2-b^2+b^2 x^2\right )^2} \, dx,x,\sin (c+d x)\right )}{d}-\frac {\left (2 a b \cos ^m(c+d x) \cos ^2(c+d x)^{-m/2}\right ) \text {Subst}\left (\int \frac {\left (1-x^2\right )^{m/2}}{\left (a^2-b^2+b^2 x^2\right )^2} \, dx,x,\sin (c+d x)\right )}{d} \\ & = \frac {b^2 \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2} (-1-m),2,\frac {3}{2},\sin ^2(c+d x),-\frac {b^2 \sin ^2(c+d x)}{a^2-b^2}\right ) \cos ^{1+m}(c+d x) \cos ^2(c+d x)^{\frac {1}{2} (-1-m)} \sin (c+d x)}{\left (a^2-b^2\right )^2 d}+\frac {a^2 \operatorname {AppellF1}\left (\frac {1}{2},\frac {1-m}{2},2,\frac {3}{2},\sin ^2(c+d x),-\frac {b^2 \sin ^2(c+d x)}{a^2-b^2}\right ) \cos ^{-1+m}(c+d x) \cos ^2(c+d x)^{\frac {1-m}{2}} \sin (c+d x)}{\left (a^2-b^2\right )^2 d}-\frac {2 a b \operatorname {AppellF1}\left (\frac {1}{2},-\frac {m}{2},2,\frac {3}{2},\sin ^2(c+d x),-\frac {b^2 \sin ^2(c+d x)}{a^2-b^2}\right ) \cos ^m(c+d x) \cos ^2(c+d x)^{-m/2} \sin (c+d x)}{\left (a^2-b^2\right )^2 d} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(7214\) vs. \(2(294)=588\).
Time = 28.60 (sec) , antiderivative size = 7214, normalized size of antiderivative = 24.54 \[ \int \frac {\cos ^m(c+d x)}{(a+b \cos (c+d x))^2} \, dx=\text {Result too large to show} \]
[In]
[Out]
\[\int \frac {\cos ^{m}\left (d x +c \right )}{\left (a +\cos \left (d x +c \right ) b \right )^{2}}d x\]
[In]
[Out]
\[ \int \frac {\cos ^m(c+d x)}{(a+b \cos (c+d x))^2} \, dx=\int { \frac {\cos \left (d x + c\right )^{m}}{{\left (b \cos \left (d x + c\right ) + a\right )}^{2}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\cos ^m(c+d x)}{(a+b \cos (c+d x))^2} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {\cos ^m(c+d x)}{(a+b \cos (c+d x))^2} \, dx=\int { \frac {\cos \left (d x + c\right )^{m}}{{\left (b \cos \left (d x + c\right ) + a\right )}^{2}} \,d x } \]
[In]
[Out]
\[ \int \frac {\cos ^m(c+d x)}{(a+b \cos (c+d x))^2} \, dx=\int { \frac {\cos \left (d x + c\right )^{m}}{{\left (b \cos \left (d x + c\right ) + a\right )}^{2}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\cos ^m(c+d x)}{(a+b \cos (c+d x))^2} \, dx=\int \frac {{\cos \left (c+d\,x\right )}^m}{{\left (a+b\,\cos \left (c+d\,x\right )\right )}^2} \,d x \]
[In]
[Out]